﻿using System;
using Infrastucture;

namespace TimeSplicerModule.DomainModels
{
    public class ApplicationItemModel : DomainObject
    {
        private Guid _applicationItemGuid;
        private string _name;
        private ApplicationItem _item;
        private string _itemEnum;
        private string _description;



        public Guid ApplicationItemGuid
        {
            get { return _applicationItemGuid; }
            set { SetProperty(ref _applicationItemGuid, value); }
        }
        public string Name
        {
            get { return _name; }
            set { SetProperty(ref _name, value); }
        }
        public string ItemEnum
        {
            get { return _itemEnum; }
            set 
            { 
                SetProperty(ref _itemEnum, value);

                if (this.Item.ToString() != value)
                    this.UpdateEnumeration<ApplicationItem>("Item", value);
            }
        }
        public ApplicationItem Item
        {
            get { return _item; }
            set 
            { 
                SetProperty(ref _item, value);
                this.UpdateEnumerationString<ApplicationItem>("ItemEnum", value);
            }
        }
        public string Description
        {
            get { return _description; }
            set { SetProperty(ref _description, value); }
        }
    }
}
